<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>002-交集选择器</title>
		<style>
			.rich {
				color: yellow;
			}

			.beauty {
				color: purple;
			}

			/* 交集选择器: 是 p 标签且 class 属性包含 beauty 时生效 */
			p.beauty {
				color: aquamarine;
			}

			.rich.beauty {
				color: blueviolet;
			}
		</style>
	</head>
	<body>
		<h2 class="rich">土豪</h2>
		<h2 class="beauty">明星李四</h2>
		<h2 class="rich beauty">明星王五</h2>
		<hr />
		<p class="beauty">小狗旺财</p>
		<p class="beauty">小猪佩奇</p>
	</body>
</html>
